<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://xmlns.jcp.org/jsf/passthrough">
<h:head>
    <meta name="viewport" content="width=device-width"/>
    <link rel="stylesheet" href="dist/css/bootstrap.min.css"/>
    <link rel="shortcut icon" href="favicon.ico"/>
    <script type="text/javascript" src="dist/js/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="dist/js/bootstrap.min.js"></script>
    <title>登录</title>
</h:head>
<body>
<div class="container mycenter">
    <h:form styleClass="form-horizontal well" id="login-form">
        <h3 class="col-sm-offset-1">管理员登录</h3>
        <div class="form-group" title="用户名：必填">
            <h:outputLabel styleClass="col-sm-2 control-label" for="username">用户名 *</h:outputLabel>
            <div class="col-sm-10">
                <h:inputText id="username" styleClass="form-control" p:placeholder="请输入用户名"
                             p:required="true" value="#{adminBean.username}" required="true"/>
                <h:message for="username" styleClass="text-danger"/>
            </div>
        </div>
        <div class="form-group" title="密码：必填">
            <h:outputLabel styleClass="col-sm-2 control-label" for="password">密&nbsp;&nbsp;码 *</h:outputLabel>
            <div class="col-sm-10">
                <h:inputSecret id="password" styleClass="form-control" p:placeholder="请输入密码"
                               p:required="true" value="#{adminBean.password}" required="true"/>
                <p class="text-danger"><h:outputText value="#{adminBean.msg}"/></p>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-2 pull-left"
                 style="margin-bottom: 1%;">
                <h:commandButton value="登录" action="#{adminBean.login}"
                                 styleClass="btn btn-primary"/>
            </div>
        </div>
    </h:form>
</div>
</body>
</html>
